﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApplication6
{
    public  class yx
    {
        private string _dsm;


        public  string Dsm{

            get { return _dsm; }
            set { _dsm = value; }
        }

      

       


        public static void cq(string ds,string me)
        {
           
            int dc=0 ;
            int medf=0;
            int dsdf=0 ;

        ll:
            dc++;
            Console.WriteLine("请出拳：1.剪刀 2.石头 3.布 （输入相应数字：）");
            int q = int.Parse(Console.ReadLine());
            
            string[] b = { "剪刀", "石头", "布" };
            int a;
            Random sb = new Random();

            a = sb.Next(3);

            Console.WriteLine("{0}: 出拳：{1}", me, b[q-1]);
            Console.WriteLine("{0}: 出拳：{1}", ds, b[a]);


            if ((q-1 == 0 && a == 2) || (q-1 == 1 && a == 0) || (q-1 == 2 && a == 1))
            {
                Console.WriteLine("恭喜，{0}赢了",me);
                

                medf++;
               

            } else if (q-1==a) {
                Console.WriteLine("和局，真衰！嘿嘿，等着瞧吧！");
               

            }
            else
            {
                Console.WriteLine("笨蛋，{0}输了",me);
                
                dsdf++;
              
            }

            Console.WriteLine("是否开始下一轮？（y/n）");
            char s = char.Parse(Console.ReadLine());

            if (s == 'y')
            {

                goto ll;

            }
            else if (s == 'n')
            {
                jg(dc, ds, me, medf, dsdf);
            }



        }



        public static void jg(int dc, string ds, string me, int medf, int dsdf) {

            Console.WriteLine("{0} VS {1}\n对战次数{2}\n\n姓名\t得分\n{3}\t{4}\n{5}\t{6}",ds,me,dc,me,medf,ds,dsdf);
            if (dsdf>medf)
            {
                Console.WriteLine("结果：{0}赢，{1}笨蛋",ds,me);
            }
            else if(dsdf==medf)
            {
                Console.WriteLine("结果：和局，真不错");
            }
            else
            {
                Console.WriteLine("结果：{0}赢，{1}笨蛋",me,ds);
            }




            Console.WriteLine("要开始下一轮吗？（y/n）");
            char a = char.Parse(Console.ReadLine());
            switch (a)
            {
                case 'y':
                    string []c = { "a" };
                    Program.Main(c);

                    break;


                case 'n':
                    Console.WriteLine("已退出");
                    break;
                default:
                    break;
            }


        }



        }
   
}
